/* jshint esversion: 6 */

import React, { lazy, Suspense } from 'react';
import {
  Route,
  Switch, HashRouter,
} from 'react-router-dom';


import {createHashHistory} from "history";
import Loader from "./components/loader/loader";
import Login from "./containers/Pages/Login";
import Main from "./containers/Pages/Main/Main";
import Work from "./containers/Pages/Oa/work/Work";
import {PRIVATE_ROUTE} from "./route.constants";
import MySchedule from "./containers/Pages/Oa/work/MySchedule";
import ScheduleAdd from "./containers/Pages/Oa/work/ScheduleAdd";
import {MemoryRouter} from "react-router";


//const Main = lazy(() => import('@iso/containers/Pages/Main/Main'));
import { createMemoryHistory} from "history";
const publicRoutes = [
    {
        path: '/',
        exact: true,
        component: lazy(() => import('@iso/containers/Pages/Login')),
    }
];




export default function Routes() {

  return (
      <>
      <Suspense fallback={<Loader/>}>

          <MemoryRouter history={createMemoryHistory()} initialEntries={['/']}>
          <Switch>

              <Route key='login' path='/' exact={true}>
                 <Login />
              </Route>
              <Route key='main' path='/main' exact={true}>
                 <Main />
              </Route>

          </Switch>
        </MemoryRouter>
      </Suspense>
      </>

  );
}
